Hi! I start a DXL-File with VBA from an excel-module with this code: "DOORSObj.runFile ("D:\myTest.dxl") 'Runs DXL-Script in specific path; currently is a open DOORS-GUI needed" If I start the code from the .dxl file directly in DXL-Interactions-Windows of the Doors-GUI, th DXL works fine! If I start the exactly same code over this DOORSObj.runFile this code Fails, with this failure: "Parameter mit dem Wert null Object wurder der Argumentposition 1 übergeben. Ausführung gestoppt.
Here is the dxl-code from the dxl-file/interaction-window:
//pragma runLim, 1000
Can anyone say me, why doors on the first hand run the code and on the second hand the code don't run, while it is the same code??? Thx! tobi_mehrl - Tue Dec 16 09:06:16 EST 2014 |
Re: Question to "DOORSObj.runFile" When you run over runFile, there is no "current" module. Therefore you will get a null object error. If you remember the first OLE example I gave you for accessing DOORS over COM, there I did: Module m; for m in database do break; // find the first open module current = m; // set it as current Object o = current // then you can get the current object Of course, if you know the module it is easier to get a handle on it, and you can of course also add some safety checks, like isvisible, so take the first open visible module. But accessing an interactive DOORS Session over COM always has pitfalls. In the end, latest if you open two DOORS instances, you will only be able to get data from the first one. So it is always better to know, which module you want to access, and open it explicitly. Regards, Mathias |